import request from '@/config/axios'

export interface OrderCostFinanceVO {
  orderNumber: string
  dictOrderType: number
  customerName: string
  customerCode: string
  salesperson: string
  costChangePerson: string
  costChangeDate: Date
  remark: string
  productNumber: string
  productName: string
  productStandard: string
  creatorName: string
  principalMaterial: number
  auxiliaryMaterial: number
  outsourcing: number
  freight: number
  electric: number
  totalPrice: number
  quotationDate: Date
  firstBid: number
  proportion: number
  transactionPrice: number
  makeProportion: number
  dictMarkStatus: number
  markChangePerson: string
  markChangeDate: Date
  markRemark: string
  financePrincipalMaterial: number
  financeAuxiliaryMaterial: number
  financeOutsourcing: number
  financeFreight: number
  financeElectric: number
  financeTotalPrice: number
  financeProportion: number
  financeRemark: string
  dictFinanceStatus: number
  financeChangePerson: string
  financeChangeDate: Date
  dictCostStatus: number
  id: number
  submitFlag: number
}

// 查询订单管理-订单报表-成本估算表(财务)列表
export const getOrderCostFinancePage = async (params) => {
  return await request.get({ url: `/report/order-cost-finance/page`, params })
}

// 查询订单管理-订单报表-成本估算表(财务)详情
export const getOrderCostFinance = async (data) => {
  return await request.post({ url: `/report/order-cost-finance/list`, data })
}

// 编辑订单管理-订单报表-成本估算表(财务)
export const updateOrderCostFinance = async (data) => {
  return await request.put({ url: `/report/order-cost-finance/saveOrSubmit`, data })
}

// 导出订单管理-订单报表-成本估算表(财务) Excel
export const exportOrderCostFinance = async (data) => {
  return await request.download({ url: `/report/order-cost-finance/export-excel`, data })
}
